#pragma once

template < typename T, typename R = void, typename A = void >
class CDelegate
{

public:

	typedef R (T::*METHOD) (A);

	CDelegate(T & o, METHOD m ) : m_object(o), m_method(m) {}

	R operator () ( A arg )
	{
		return (m_object.*m_method) ( arg );
	}

private:

	T &    m_object;
	METHOD m_method;
};
